import VueRouter from 'vue-router'
import Vue from "vue"

Vue.use(VueRouter)

const router = new VueRouter({
    mode: 'history', //去掉url中的#
    history: true, // 启用HTML5 history模式，可以使用pushState和replaceState来管理记录
    routes: [
        {
            path: "/",
            redirect: "/index"
        },
        {
            path: "/index",
            component: () => import("@/view/index")
        }
    ]
})

export default router